<?php include_stylesheets_for_form($form) ?>
<?php include_javascripts_for_form($form) ?>

<form id="form_enquete" name="form_enquete" action="<?php echo url_for('enquete/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?id_enquete='.$form->getObject()->getIdEnquete() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<?php if (!$form->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<input type="hidden" name="id_enquete" value="<?php echo $form->getObject()->getIdEnquete() ?>" />
<?php endif; ?>
	<?php echo $form->renderHiddenFields() ?>
<table class="form">
	<tbody>
		<tr>
			<th colspan="2" class="title">Dados enquete</th>
		</tr>
		<?php echo $form->renderGlobalErrors() ?>
		<tr>
			<th class="required"><?php echo $form['ds_pergunta']->renderLabel() ?></th>
			<td><?php echo $form['ds_pergunta'] ?> <?php echo form_error('enquete[ds_pergunta]'); ?></td>
		</tr>
		<tr>
			<th><?php echo $form['st_enquete']->renderLabel() ?></th>
			<td><?php echo $form['st_enquete'] ?> <?php echo form_error('enquete[st_enquete]'); ?></td>
		</tr>
	</tbody>
</table>

<br />
 <?php include_component($this->getModuleName(), 'perguntas', array('form'=>$form)); ?>

<?php
	comandos_form(
		link_to(
			':: Listar ::',
			'enquete/list',
			array('class' => 'botao')
		),
		submit_tag(':: Salvar ::')
	);
?>

</form>

<script type="text/javascript">
$(function(){
	System.formdata.save(new Array('msgAlerta', 'Atenção'));

	
});
</script>